﻿<%@ Page Title="Slabs" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"
    CodeBehind="SlabStructure.aspx.cs" Inherits="TestJQGrid.SlabStructure" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
<link rel="stylesheet" type="text/css" media="all" href="../jsdatepick-calendar/jsDatePick_ltr.min.css" />
    <script type="text/javascript" src="../jsdatepick-calendar/jsDatePick.min.1.3.js"></script>
    
    <script type="text/javascript">
        function getDate(cid)
        {
            new JsDatePick({
                    useMode: 2,
                    target: cid,
                    dateFormat: "%d-%M-%Y",
                });
        }
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <asp:Label ID="lblMenuName" runat="server" Text="Label"></asp:Label>
    <table>
        <tr>
            <td rowspan="2" style="width: 20%;" align="left" valign="top">
                    <asp:ListBox ID="LBSlabs" runat="server" Rows="30" Width="100%" DataSourceID="SDSSlabList"
                        DataTextField="SlabName" DataValueField="SlabId" OnDataBound="LBSlabs_DataBound"
                        OnSelectedIndexChanged="LBSlabs_SelectedIndexChanged" AutoPostBack="True"></asp:ListBox>
                    <asp:SqlDataSource ID="SDSSlabList" runat="server" ConnectionString="<%$ ConnectionStrings:AgentBillingConnectionString %>"
                        SelectCommand="SELECT [SlabId], [SlabName] FROM [Slabs] WHERE [ToDate] > getDate() AND ProductName = @ProductName">
                        <SelectParameters>
                            <asp:SessionParameter DefaultValue="'default'" Name="ProductName" Type="String" SessionField="ProductName" />
                        </SelectParameters>
                    </asp:SqlDataSource>

            </td>
            <td style="height: 200px" width="100%" align="left" valign="top">
                <asp:Panel ID="Panel1" runat="server" BorderColor="Black" BorderWidth="1px" Width="500px"
                    Height="172px">
                    &nbsp;&nbsp;&nbsp;&nbsp;
                    <asp:Label ID="LabelName" runat="server" Text="Slab Name" Width="110px"></asp:Label>
                    <asp:TextBox ID="TextBoxName" runat="server" Width="270px"></asp:TextBox>
                    <br />
                    &nbsp;&nbsp;&nbsp;&nbsp;
                    <asp:Label ID="LabelDateFrom" runat="server" Text="Valid From" Width="110px"></asp:Label>
                    <asp:TextBox ID="TextBoxFrom" runat="server" Width="120px" onClick="return getDate('MainContent_TextBoxFrom');"></asp:TextBox>
                    <asp:Label ID="LabelDateTo" runat="server" Text="TO" Width="20px"></asp:Label>
                    <asp:TextBox ID="TextBoxTo" runat="server" Width="120px" onClick="return getDate('MainContent_TextBoxTo');"></asp:TextBox>
                    <br />
                    &nbsp;&nbsp;&nbsp;&nbsp;
                    <asp:Label ID="LabelStepped" runat="server" Text="Stepped/Tiered" Width="110px"></asp:Label>
                    <asp:DropDownList ID="DropDownList5" runat="server">
                        <asp:ListItem>Stepped</asp:ListItem>
                        <asp:ListItem>Tiered</asp:ListItem>
                    </asp:DropDownList>
                    <br />
                    &nbsp;&nbsp;&nbsp;&nbsp;
                    <asp:Label ID="LabelRow" runat="server" Text=" Row Properties" Width="110px"></asp:Label>
                    &nbsp;&nbsp;&nbsp;<asp:Label ID="LabelRowCount" runat="server" Text="Count"></asp:Label>
                    &nbsp;<asp:DropDownList ID="DropDownList1" runat="server" Height="25px" Style="margin-left: 0px"
                        Width="50px">
                        <asp:ListItem>1</asp:ListItem>
                        <asp:ListItem>2</asp:ListItem>
                        <asp:ListItem>3</asp:ListItem>
                        <asp:ListItem>4</asp:ListItem>
                        <asp:ListItem>5</asp:ListItem>
                        <asp:ListItem>6</asp:ListItem>
                        <asp:ListItem>7</asp:ListItem>
                        <asp:ListItem>8</asp:ListItem>
                        <asp:ListItem>9</asp:ListItem>
                    </asp:DropDownList>
                    &nbsp;&nbsp;&nbsp;<asp:Label ID="LabelRowRelOp" runat="server" Text="Operator"></asp:Label>
                    &nbsp;<asp:DropDownList ID="DropDownList2" runat="server" Height="25px" Width="50px">
                        <asp:ListItem>&lt;</asp:ListItem>
                        <asp:ListItem>&gt;</asp:ListItem>
                        <asp:ListItem>&lt;=</asp:ListItem>
                        <asp:ListItem>&gt;=</asp:ListItem>
                        <asp:ListItem>=</asp:ListItem>
                    </asp:DropDownList>
                    <br />
                    &nbsp;&nbsp;&nbsp;&nbsp;
                    <asp:Label ID="LabelColumn" runat="server" Text=" Column Properties" Width="110px"></asp:Label>
                    &nbsp;&nbsp;
                    <asp:Label ID="LabelColCount" runat="server" Text="Count"></asp:Label>
                    &nbsp;<asp:DropDownList ID="DropDownList3" runat="server" Height="25px" Width="50px">
                        <asp:ListItem>1</asp:ListItem>
                        <asp:ListItem>2</asp:ListItem>
                        <asp:ListItem>3</asp:ListItem>
                        <asp:ListItem>4</asp:ListItem>
                        <asp:ListItem>5</asp:ListItem>
                        <asp:ListItem>6</asp:ListItem>
                        <asp:ListItem>7</asp:ListItem>
                        <asp:ListItem>8</asp:ListItem>
                        <asp:ListItem>9</asp:ListItem>
                    </asp:DropDownList>
                    &nbsp;&nbsp;&nbsp;<asp:Label ID="LabelColRelOp" runat="server" Text="Operator"></asp:Label>
                    &nbsp;<asp:DropDownList ID="DropDownList4" runat="server" Height="25px" Width="50px">
                        <asp:ListItem>&lt;</asp:ListItem>
                        <asp:ListItem>&gt;</asp:ListItem>
                        <asp:ListItem>&lt;=</asp:ListItem>
                        <asp:ListItem>&gt;=</asp:ListItem>
                        <asp:ListItem>=</asp:ListItem>
                    </asp:DropDownList>
                    <br />
                    <br />
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    <asp:DropDownList ID="DDLStatus" runat="server" Height="20px" Width="90px">
                        <asp:ListItem>Saved</asp:ListItem>
                        <asp:ListItem>Submitted</asp:ListItem>
                        <asp:ListItem>Approved</asp:ListItem>
                        <asp:ListItem>Rejected</asp:ListItem>
                    </asp:DropDownList>
                    &nbsp;&nbsp;&nbsp;
                    <asp:Button ID="ButtonApply" runat="server" Height="30px" Text="Apply" Width="75px"
                        OnClick="ButtonApply_Click" OnClientClick="retrun Validation_Slab()" />
                    &nbsp;&nbsp;
                    <asp:Button ID="ButtonCancel" runat="server" Height="30px" Text="Cancel" Width="75px"
                        OnClick="ButtonCancel_Click" />
                    <asp:Button ID="ButtonEdit" runat="server" Height="30px" Text="Edit" Width="75px"
                        OnClick="ButtonEdit_Click" />
                    &nbsp;&nbsp;
                    <asp:Button ID="ButtonCreate" runat="server" Height="30px" Text="Create New" Width="90px"
                        OnClick="ButtonCreate_Click" />
                </asp:Panel>
            </td>
        </tr>
        <tr>
            <td align="left" valign="top">
                <asp:Panel ID="panelOuter" runat="server" Width="500px" ScrollBars="Both" Height="300px"
                    BorderColor="Black" BorderWidth="1px">
                    <asp:Panel ID="panelInner" runat="server">
                        <asp:GridView ID="GridView1" runat="server" AutoGenerateEditButton="True" OnRowEditing="GridView1_RowEditing">
                        </asp:GridView>
                    </asp:Panel>
                </asp:Panel>
            </td>
        </tr>
    </table>
</asp:Content>
